import Cookies from 'js-cookie'

const TokenKey = 'token'
const RoleId = 'roleId'
const UserName = 'userName'
// token
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 用户id
export function getRoleId() {
  return Cookies.get(RoleId)
}

export function setRoleId(roleId) {
  return Cookies.set(RoleId, roleId)
}

export function removeRoleId() {
  return Cookies.remove(RoleId)
}
// 用户名称
export function getUserName() {
  return Cookies.get(UserName)
}

export function setUserName(name) {
  return Cookies.set(UserName, name)
}

export function removeUserName() {
  return Cookies.remove(UserName)
}
